﻿<UserControl x:Class="devtm.AutoMapper.LstBox"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:c="clr-namespace:devtm.AutoMapper"
             mc:Ignorable="d" 
             d:DesignHeight="255" d:DesignWidth="486">
    <UserControl.Resources>

        <DataTemplate DataType="{x:Type c:BoxItemMap}">
            <Grid HorizontalAlignment="Stretch">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="100" />
                    <ColumnDefinition MinWidth="100" />
                </Grid.ColumnDefinitions>
                <Label Grid.Column="0" Content="{Binding SourceName}" />
                <Label Grid.Column="1" Content="{Binding TargetName}" />
            </Grid>
        </DataTemplate>

        
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Label Content="{Binding ., Path=TypeDestination}" Grid.Row="0" />
        <ListBox ItemsSource="{Binding ., Path=ItemMaps}" Grid.Row="1" x:Name="ListeBase" HorizontalAlignment="Stretch" SelectionChanged="SelectionChanged" BorderThickness="0" >
            <ListBox.Background>
                <ImageBrush  AlignmentX="Right" AlignmentY="Bottom" Stretch="None" />
            </ListBox.Background>
        </ListBox>
    </Grid>
</UserControl>
